#include<iostream>
#include<string>
#include<cstdlib>
#include<fstream>
using namespace std;
int main()
{
	string filename;
	cout<< "请输入文件名";
	cin >> filename;
	ifstream file(filename,ios::in);
	if(!file)
	{
		cout << "文件打开失败" <<endl;
		exit(0);
	}
	string line;
	int i=1;
	while(getline(file, line))
	{
		cout << i <<": "<<line<<endl;
		i++;
		if(i%25==0)
		{
			cout << "按任意键继续......"<<endl;
			cin.get();
			cin.ignore(); 
		}
	}
	file.close();
	return 0;
}
/*测试样例
C:\\Users\\醣玖\\Desktop\\第三次作业\\第四题\\cs1.txt
*/